import { postAxios, getAxios, postDownloadAxios } from "@/lib/http";

export const bodyApi = {
  // 获取详情
  getById: data => {
    return getAxios(`/body/getById/${data}`);
  },
  // 添加车身 @author 何杺
  addBody: data => {
    return postAxios("/body/add", data);
  },
  // 分页查询车身 @author 何杺
  queryBody: data => {
    return postAxios("/body/page/query", data);
  },
  // 批量删除车身 @author 何杺
  batchDeleteBody: idList => {
    return postAxios("/body/deleteByIds", idList);
  },
  // 修改车身  @author 何杺
  updateBody: data => {
    return postAxios("/body/update", data);
  },
  // 导出全部  @author 何杺
  exportAll: data => {
    return postDownloadAxios("/body/export/all", data);
  },
  // 批量导出  @author 何杺
  batchExport: idList => {
    return postDownloadAxios("/body/export/batch", idList);
  }
};
